package 笔试现场;

import java.math.BigInteger;
import java.util.Scanner;

public class Problem1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Long[] values = new Long[n];
        for (int i = 0; i < n; i++) {
            values[i] = i-1 >=0 ? scanner.nextLong()+values[i-1]:scanner.nextLong();
        }
        BigInteger ans = new BigInteger("0");
        int ansI = -1;
        for (int i = 0; i < n; i++) {
            BigInteger bigInteger1 = new BigInteger(values[n - 1].toString());
            BigInteger bigInteger2 = new BigInteger(values[i].toString());
            BigInteger multiply = bigInteger1.subtract(bigInteger2).multiply(bigInteger2);
            if(multiply.compareTo(ans)>0){
                ansI = i;
                ans = multiply;
            }
        }
        System.out.println(ansI+1);
    }
}
